package main

import "fmt"

func main() {
	var arr1 = [5]int{1, 2, 3, 4, 5}

	var arr2 [5]int = arr1
	fmt.Println("arr2 =", arr2)

	modifyArray1(&arr1)

	fmt.Println("arr1 =", arr1)

	//运行会报错：cannot use arr (type [5]int) as type [6]int in assignment
	//var arr3 [6]int = arr2

}

func modifyArray1(arr *[5]int) {
	arr[1] = 100
}
